package com.lkd.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lkd.entity.Region;
import com.lkd.mapper.RegionMapper;
import com.lkd.service.RegionService;
import com.lkd.vo.PageBean;
import com.lkd.vo.RegionVo;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 运营区域 服务实现类
 * </p>
 *
 * @author 聂德祥
 * @since 2024-08-17
 */
@Service
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements RegionService {

    @Override
    public PageBean<RegionVo> search(String name, Integer pageIndex, Integer pageSize) {
        Page<RegionVo> regionVoPage = new Page<>(pageIndex, pageSize);
        regionVoPage = baseMapper.search(regionVoPage,name);
        return new PageBean<RegionVo>(regionVoPage);
    }
}
